var requrl = $request.url;

if(requrl == 'https://zy.mdqrmyy.com/api/patient/wxlogin'){
    var rsp = $response.body;

    var newurl2 = "https://api.day.app/push";
    var header = {'Content-Type': 'application/json; charset=utf-8'};
    var tzjson = {"title": '测试消息',"body": rsp,"device_key": "SR5R2j5UCzZmkq23WcuwCg","badge": 1,"sound": "birdsong.caf","icon": "https://day.app/assets/images/avatar.jpg"};
    
    var newbody = JSON.stringify(tzjson);

    let params = {
        url: newurl2,
        headers: header,
        body: newbody, 
    }
    $httpClient.post(params, function(error, response, data) {})
}

$done({})